package file

import "blog/app/model"

type tableFileName struct {
}

func (rev *tableFileName) TableName() string {
	return "p_file"
}

type File struct {
	tableFileName
	ID        int    `gorm:"primaryKey;autoIncrement"`
	Hash      string `gorm:"column:hash"`
	Url       string `gorm:"column:url"`
	Fid       int    `gorm:"column:fid"`
	TpHash    string `gorm:"column:tp_hash"`
	Type      int    `gorm:"column:type"`
	OriginUrl string `gorm:"column:origin_url"`
	model.SoftModel
}

type CreateFile struct {
	tableFileName
	Name      string `gorm:"column:name"`
	Hash      string `gorm:"column:hash"`
	Url       string `gorm:"column:url"`
	Fid       int    `gorm:"column:fid"`
	Type      string `gorm:"column:type"`
	OriginUrl string `gorm:"column:origin_url"`
	Domain    string `gorm:"-"`
	IsHttps   int    `gorm:"-"`
	model.SoftModel
}
